<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>个人信息</title>
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/tpshop.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/myaccount.css" />
		<script src="__STATIC__/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<link type="text/css" rel="stylesheet" href="/public/plugins/daterangepicker/daterangepicker-bs3.css">
		<script type="text/javascript" src="/public/plugins/daterangepicker/moment.min.js"></script>
		<script type="text/javascript" src="/public/plugins/daterangepicker/daterangepicker.js"></script>
	</head>
	<body class="bg-f5">
	<include file="user/header"/>
		<div class="home-index-middle">
			<div class="w1224">
				<div class="g-crumbs">
			       	<a href="{:U('Home/User/index')}">我的商城</a>
			       	<i class="litt-xyb"></i>
			       	<span>个人信息</span>
			    </div>
			    <div class="home-main">
					<include file="user/menu"/>
			    	<div class="ri-menu fr">
						<div class="menumain p">
							<div class="goodpiece">
								<h1>个人信息</h1>
								<!--<a href=""><span class="co_blue">帮助</span></a>-->
							</div>
							<div class="personerinfro">
								<form action="" method="post">
									<ul class="hend_jz">
										<li class="infor_wi_le"><a href="javascript:void(0);">头像：</a></li>
										<li class="infor_img">
											<a href="javascript:void(0);">
												<img id="preview" src="{$user.head_pic|default='__STATIC__/images/headPic.jpg'}" onClick="GetUploadify2(1,'head_pic','head_pic','add_img')"/>
											</a>
											<input type="hidden" name="head_pic" id="head_pic" value="{$user.head_pic}">
										</li>
									</ul>
									<ul class="name_jz">
										<li class="infor_wi_le"><a href="javascript:void(0);">昵称：</a></li>
										<li><a href="javascript:void(0);"><input class="name_zjxs" type="text" name="nickname" id="nickname" value="{$user.nickname}" /></a></li>
									</ul>
									<!--<ul class="name_jz">-->
										<!--<li class="infor_wi_le"><a href="javascript:void(0);">真实姓名：</a></li>-->
										<!--<li><a href="javascript:void(0);"><input class="name_zjxs" type="text" name="" id="" value="" /></a></li>-->
									<!--</ul>-->
									<ul class="sex_jz">
										<li class="infor_wi_le"><a href="javascript:void(0);">性别：</a></li>
										<li>
											<a href="javascript:void(0);">
												<input type="radio" name="sex" id="secret" <if condition="$user['sex'] eq '0'">checked</if> value="0"/><label for="secret">保密</label>
												<input type="radio" name="sex" id="man" <if condition="$user['sex'] eq '1'">checked</if> value="1"/><label for="man">男</label>
												<input type="radio" name="sex" id="woman" <if condition="$user['sex'] eq '2'">checked</if> value="2"/><label for="woman">女</label>
											</a>
										</li>
									</ul>
									<ul class="birth_jz">
										<li class="infor_wi_le"><a href="javascript:void(0);">生日：</a></li>
										<li>
											<a href="javascript:void(0);">
												<input type="text" name="birthday" id="birthday" value="{$user.birthday|date='Y-m-d',###}" />
											</a>
										</li>
									</ul>
									<ul class="hobby_jz">
										<li class="infor_wi_le"></li>
										<li class="infor_wi_ri">
											<div class="pcews">
												<span><i class="ph_c"></i>手机</span>
												<span class="<if condition='$user[mobile_validated] eq 0'>change_e<else/>change_p</if>"><a href="{:U('Home/User/mobile_validate',array('type'=>'mobile','step'=>1))}" style="cursor:pointer;"><if condition="$user['mobile_validated'] eq 0">未绑定<else/>更换绑定</if></a></span>
												<span><i class="em_c"></i>邮箱</span>
												<span class="<if condition='$user[email_validated] eq 0'>change_e<else/>change_p</if>"><a href="{:U('Home/User/email_validate',array('type'=>'email','step'=>1))}" style="cursor:pointer;"><if condition="$user['email_validated'] eq 0">未绑定<else/>更换绑定</if></a></span>
											</div>
											<div class="careful">
												<span class="fir_sen">注：修改密码、手机等信息到</span>
												<span class="co_blue"><a href="{:U('Home/User/safety_settings')}" style="cursor:pointer;">安全设置</a></span>
											</div>
											<div class="save_s">
												<input class="save" type="submit" id="" name="" value="确认保存" />
											</div>
										</li>
									</ul>
								</form>
							</div>
						</div>
			    	</div>
			    </div>
			</div>
		</div>
		<!--footer-s-->
		<div class="footer p"><include file="public/footer" /> </div>
		<!--footer-e-->
		<script type="text/javascript">
			$(document).ready(function() {
				// 生日时间
				$('#birthday').daterangepicker({
					singleDatePicker: true,
					showDropdowns: true,
					minDate: '1900-01-01',
					maxDate: moment(),
					startDate: moment(),
					format: 'YYYY-MM-DD', //控件中from和to 显示的日期格式
					locale: {
						applyLabel: '确定',
						cancelLabel: '取消',
						fromLabel: '起始时间',
						toLabel: '结束时间',
						customRangeLabel: '自定义',
						daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
						monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
							'七月', '八月', '九月', '十月', '十一月', '十二月'],
						firstDay: 1
					}
				});
				$('.daterangepicker').hide();
			});
			$(function(){
				$('.choice_hobby').click(function(){
					$(this).toggleClass('red');
				})
			})
			function delimg(file,t){
				$.get(
						"/index.php?m=Admin&c=Uploadify&a=delupload",{action:"del", filename:file},function(){}
				);
				$('#head_pic').val('');
				$('#preview').attr('src','');
				$(t).remove();
			}
			function add_img(str){
				var head_pic = $('#head_pic').val();
				$('#head_pic').val(str);
				$('#preview').attr('src',str);
				$('img[class="headpic"]').attr('src',str);

			}
		</script>
	</body>
</html>